#include <iostream>
#include <string>

using namespace std;


class my_class_1
{
private:
    int val;
public:
    my_class_1(/* args */)
    {
        cout << "无参构造函数" << endl;
    }
    my_class_1(int val_1)
    {
        cout << "有参构造函数" << endl;
    }
    ~my_class_1()
    {
        cout << "析构函数" << endl;
    }
};

/*
没有将 子类 放置在初始化列表中的时候 子类默认调用无参构造
*/

class my_class
{
private:
    const int val_1;
    const int val_2;
    const int val_3;

    my_class_1 c_1;

public:

    my_class(int val_1 , int val_2 , int val_3 , int val_4):
        val_1(val_1) , val_2(val_2) , val_3(val_3) , c_1(val_4)
    {
        cout << "调用初始化列表" << endl;
    }

    ~my_class();

public:
    void show()
    {
        cout << val_1 << val_2 << val_3 << endl;
    }

};

my_class::~my_class()
{
}

int main(int argc, char const *argv[])
{
    my_class c1(10 , 10 , 10 , 10);
    c1.show();
    

    return 0;
}